package com.tg.base.concurrent;

import com.google.common.collect.Lists;

import java.util.ArrayList;

public class SlowAction {

    /**
     * 慢操作，同时
     */
    public static int invoke() {
        ArrayList<Integer> objects = Lists.newArrayList();
        ArrayList<Integer> results = Lists.newArrayList();

        for (int i = 0; i < 100000; i++) {
            objects.add(i);
            int t = 5 * i;
            if (objects.contains(t)) {
                results.add(t);
            }
        }
        return 0;
    }
}
